import React, { Component } from 'react'
import './Index.css'
import { Switch, NavLink, Route } from 'react-router-dom'
let Home = React.lazy(() => import("../Home/Home"));
let Cate = React.lazy(() => import("../Cate/Cate"));
let Shop = React.lazy(() => import("../Shop/Shop"));
let Mine = React.lazy(() => import("../Mine/Mine"));

export default class Index extends Component {
  render() {
    return (
      <>
        <Switch>
          <Route path="/index/home" component={Home}></Route>
          <Route path="/index/cate" component={Cate}></Route>
          <Route path="/index/shop" component={Shop}></Route>
          <Route path="/index/mine" component={Mine}></Route>
         
        </Switch>

        <footer className='index-navs'>
        <NavLink to="/index/home" activeClassName='select'>
        <i className='iconfont icon-biaoqiankuozhan_shangcheng-246'></i>
        首页
        </NavLink>
        
        <NavLink to='/index/cate' activeClassName='select'>  
        <i className='iconfont icon-zujian-icon-18'></i>
        分类
        </NavLink> 
        <NavLink to="/index/shop" activeClassName='select'>
        <i className='iconfont icon-Shapecopy'></i>
        购物车
        </NavLink>
      
        <NavLink to="/index/mine" activeClassName='select'>  
        <i className='iconfont icon-wode'></i>
        我的
        </NavLink>
        </footer>
      </>
    )
  }
}
